{% extends 'Base/main.content.lists.div.html.twig' %}{% import 'Base/list_item.twig' as listItem %}
{% block options %}
{% endblock %}
{% block tableHead %}
    <tr>
        <th width="3%">选择</th>
        <th width="4%">ID</th>
        <th align="left">名称</th>
        <th align="left">编码</th>
        <th align="left" width="10%">level</th>
        <th align="left" width="10%">排序</th>
        <th align="center" width="10%">管理</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align="center">
                <span class="checkall" style="vertical-align:middle;">
                    <input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.Role_id }}"/>
                </span>
            </td>
            <td align="left">
                {{ Entity.Role_id }}
            </td>
            <td align="left">
                {% if Entity.Role_level > 0 %}{% for i in 0..Entity.Role_level %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{% endfor %}├{% for i in 0..Entity.Role_level %}─{% endfor %}{% endif %}
                {{ Entity.Role_name }}
            </td>
            <td align="left">
                {{ Entity.Role_code }}
            </td>
            <td align="left">{{ Entity.Role_level }}</td>
            <td align="left">
                <input
                        id="val_orders_{{ Entity.Role_id }}"
                        type="text" value="{{ Entity.Role_orders }}"
                        class="layui-input"
                        {#onkeydown="return checkNumber(event);"#}
                        onblur="__doPostBack('setAttr','id={{ Entity.Role_id }}&orders='+ $('#val_orders_{{ Entity.Role_id }}').val())"
                        >
            </td>
            <td align="center">
                <div class="layui-btn-group">
                    <a href="{{ path("RolePreAdd") }}?parent={{ Entity.Role_id }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-plus c13"></span></a>
                    <a href="{{ path("RolePreEdit",{'id':Entity.Role_id}) }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-edit c13"></span></a>
                </div>
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

